signature FRAME_STRUCTS =
sig
  structure Ir : IR
  structure Types : TYPES2
  structure Assem : ASSEM
  sharing Ir.Types = Types
end


signature FRAME =
sig
  include FRAME_STRUCTS

  type mytype = Ir.Types.t
  type frame

  val newFrame : string -> int -> mytype -> frame
  val allocArgs : frame -> int -> int
  val allocLocals : frame -> int -> int
  val getLocals : frame -> int
  val getFname : frame -> string
  val getEpilog : frame -> string
  val getRetType : frame -> mytype
  val getRegSize : unit -> int


  val setCode : frame * Assem.codeblk list -> frame
  val getCode : frame -> Assem.codeblk list option

  val setEnv : frame * ((Assem.aptr * Assem.aptr * Assem.etype) list) -> frame
  val getEnv : frame -> ((Assem.aptr * Assem.aptr * Assem.etype) list) option 

  val setPre : frame * (Assem.assert * Assem.passert) option -> frame
  val getPre : frame -> (Assem.assert * Assem.passert) option
  val getPreA : frame -> Assem.assert option

  val setPost : frame * (Assem.assert * Assem.passert) option -> frame
  val getPost : frame -> (Assem.assert * Assem.passert) option
  val getPostA : frame -> Assem.assert option

end
